package com.zmn.oms.services.impl.quotation3;

import com.zmn.oms.model.entity.quotation3.OrderMaintainItem;
import com.zmn.oms.persistence.interfaces.quotation3.OrderMaintainItemDao;
import com.zmn.oms.services.interfaces.quotation3.OrderMaintainItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author sunlife
 * @date:2021/12/2 12:02 下午
 * description:
 */
@Service
public class OrderMaintainItemServiceImpl implements OrderMaintainItemService {
    @Resource
    OrderMaintainItemDao orderMaintainItemDao;

    @Override
    public void insertList(List<OrderMaintainItem> maintainItemList) {
        orderMaintainItemDao.batchInsert(maintainItemList);
    }

    @Override
    public List<OrderMaintainItem> listByOrderId(Long orderId) {
        return orderMaintainItemDao.listByOrderId(orderId);
    }

    @Override
    public int deleteByMaintainIds(List<Long> maintainItemIdList) {
        return 0;
    }
    @Override
    public int deleteByOrderId(Long orderId) {
        return orderMaintainItemDao.deleteByOrderId(orderId);
    }

    @Override
    public int update(OrderMaintainItem maintainItem) {
        return orderMaintainItemDao.updateByPrimaryKeySelective(maintainItem);
    }
}
